import Vue from 'vue'
import VueRouter from 'vue-router'
import Vuex from 'vuex'
import Index from '../components/Index.vue'
import Course from '../components/Course.vue'
import UserSettings from '../components/UserSettings.vue'
import BasicInfo from '../components/BasicInfo.vue'

// 在这里配置路由， 导入 用户设置配置和 基本信息配置

Vue.use(VueRouter)
Vue.use(Vuex)

const videoDetail = () => import('../components/videoDetail.vue');

  const routes = [
  {
    path: '/',
    name: 'Index',
    component: Index,
    meta: {
      title: '首页'
  }
  },
  {
    path: '/Course',
    name: 'Course',
    component: Course,
    meta: {
      title: '课程简介页'
  }
  },
  {
    path: '/videoDetail',
    name: 'videoDetail',
    component: videoDetail,
    meta: {
        title: '视频播放页'
    }
},
// 路由到设置页面
{
  path: '/setting',
  name: 'UserSettings',
  component: UserSettings,
  meta: {
    title: '用户设置'
  }
},
{
  path: '/basicInfo',
  name: 'BasicInfo',
  component: BasicInfo,
  meta: {
    title: '基本信息'
  }
}
  //{
    // path: '/about',
    // name: 'About',
    // // route level code-splitting
    // // this generates a separate chunk (about.[hash].js) for this route
    // // which is lazy-loaded when the route is visited.
    // component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  //}
]

const router = new VueRouter({
  routes
})

export default router

